package com.by.common.exception;

import java.util.HashMap;
import java.util.Map;

/**
 * 后端校验  异常信息
 */
public class ValidateException extends RuntimeException {
    Map error;

    public ValidateException(Map error){
        super();
        this.error = error;
    }

    public ValidateException(String filed,String msg){
        super();
        this.error = new HashMap<>();
        this.error.put(filed,msg);
    }

    public Map getError(){
        return error;
    }

}
